﻿<div ng-controller="AttendanceListController">

    <div class="mt50 clearfix">
        <h3>Atendance list</h3>
        <ul class="listNgang clearfix">
            <li>
                {{texts['lb-store']}}:
            </li>
            <li>
                {{totalOfMonth.StoreName}}
            </li>
        </ul>
        <ul class="listNgang fleft clearfix">
            <li>
                {{texts['lb-staff-name']}}:
            </li>
            <li class="mr15">{{totalOfMonth.Name}}</li>
            <li> <input type="text" datepicker-popup="{{format}}" ng-model="month" is-open="openDayFrom1" max-date="'2020-06-22'" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
            </li>
            <li> <button type="button" class="btn btn-default colorBlack" ng-click="openDayFrom1($event)"><i class="glyphicon glyphicon-calendar"></i></button></li>
        </ul>
        <ul class="listNgang fright mr30 clearfix">
            <li><button class="w110" ng-click="changeTime()">{{texts['btn-change-time']}}</button></li>
            <li><a id="expCsv" ng-click="ExpCSV()"><button class="w110">{{texts['btn-export-csv']}}</button></a></li>
        </ul>
    </div>
    <div class="mb10 clearfix">
        <ul class="listNgang clearfix">
            <li>
                {{texts['lb-total-date']}}
            </li>
            <li>
                {{totalOfMonth.TotalWorkDate == "" ? 0 : totalOfMonth.TotalWorkDate}}{{texts['day']}}
            </li>
            <li>
                {{texts['lb-total-work']}}
            </li>
            <li>
                {{totalOfMonth.TotalWork == "" ? 0 : totalOfMonth.TotalWork}}
            </li>
            <li>
                {{texts['lb-total-break']}}
            </li>
            <li>
                {{totalOfMonth.TotalBeark == "" ? 0 : totalOfMonth.TotalBeark }}
            </li>
            <li>
                {{texts['lb-total-go-out']}}
            </li>
            <li>
                {{totalOfMonth.TotalGoOut == "" ? 0 : totalOfMonth.TotalGoOut}}
            </li>
        </ul>
    </div>
    <div class="clearfix">
        <table class="tableKind-01 table-AttendanceList w760" >
            <tr>
                <th>{{texts['lb-date']}}</th>
                <th>{{texts['lb-check-in']}}</th>
                <th>{{texts['lb-check-out']}}</th>
                <th>{{texts['lb-work']}}</th>
                <th>{{texts['lb-break']}}</th>
                <th>{{texts['lb-go-out']}}</th>
            </tr>
            <tr ng-repeat="rows in listWork">
                <td >
                    <a ng-click="edit(rows.Id, rows.StampDate)">{{rows.StampDate | date :'M/dd'}}</a>
                </td>
                <td>{{rows.CheckIn}}</td>
                <td>{{rows.CheckOut}}</td>
                <td>{{rows.TotalWork}}</td>
                <td>{{rows.TotalBeark}}</td>
                <td>{{rows.TotalGoOut}}</td>
            </tr>
        </table>
    </div>
</div>
